define(function(require){
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");
  //  var yuming='http://192.168.31.236:8080';
    var quxiao=function(){
       $('#wxloading').css("display","none");
    }
	var Model = function(){
		this.callParent();
	};

	Model.prototype.modelParamsReceive = function(event){
       var data=this.comp("zhuanjia");
       data.clear();
       data.loadData([this.params.rowdata]);
       data.first();
       var uid=[this.params.rowdata][0]['uid']['value'];
       alert(uid)
    //   var dataxin=this.comp("zhuanjia");
   //    var  json=dataxin.toJson().rows.uid.value;
      // console.log([this.params.rowdata][0].uid.value)
    //   console.log(json)
     //  alert([this.params.rowdata][0]['uid']['value'])
    //   alert(json)
    alert(window.token)
    	$.ajax({
        type: "GET",
        url: yuming+'/videoconnects/vc/'+uid,     
        async: false,
        cache: false,
        headers: {
              "login-token":localStorage.token      
            },
        success: function(datas){
            alert(datas.url);
            location.href=datas.url+datas.roomid;
            },
        error: function(XMLHttpRequest){
        var code=$.parseJSON(XMLHttpRequest.responseText);
          
           $('.wx_loading_inner').html(code.message);
		   $('#wxloading').css("display","block"); 
		   setTimeout(quxiao,2000);
         
        }
    });
	};

	return Model;
});